< previous page page_382 next page >

Page 382
You can make properties for each of these items in the Employees object. You would then identify the properties for each of the other objects in your system.
As you can see, object-oriented design involves looking at things in the real world and modeling them in terms of objects, actions, and data (or classes, methods, and properties). There are several tools available on the market that can help you create a design document using a Unified Modeling Language (UML). These tools let you create pictures that will model the entities you are trying to automate in your program. In some cases these tools allow you to even generate the classes for your application.
Other Examples of Classes
Many classes are reusable in many different business applications. These classes dont really model things in the real world so much as they deal with computer-related items used in software development. Here are some reusable classes that youll see built in this book and that can be used in your own applications:
INI file class
Registry class
TextStream class
The reason for creating these classes is to abstract and encapsulate the data and methods into easy-to-use routines. This makes performing operations on these type of processes easier to do for beginning programmers, and it lets advanced programmers focus on more critical areas of the application.
Advantages of OOP
Now that youve learned the terminology of OOP and how to apply it in Visual Basic, lets look at some of the advantages of using this methodology. Youve already been exposed to most of these advantages; theyre reiterated here so youll really learn them.
Encapsulation
In any programming language, you should strive to make black-box functions. These routines should perform tasks for you, without you knowing how they actually did the work. This is called encapsulation. Unfortunately, not all black-box routines are totally self-contained. They often rely on global variables or other routines.

 
< previous page page_382 next page >

If you like this book, buy it!